home *** CD-ROM | disk | FTP | other *** search
- Here is a usefull little patch for those of you who use the ANSI.SYS
- device driver, and wish like to have it set the screen color for you.
- Unfortunately, it is impossible using ANSI.SYS to set the color of the
- screen border. This makes for an ugly screen in my opinion. I decided
- to replace one useless ANSI.SYS command with a command which will set
- the screen border color; specifically the ESC[=#h command, which will
- set the screen mode to 80 column, 40 column, black&white, and color.
- Since the dos MODE command will do the same thing, I have never used
- ANSI.SYS in this way. After making this patch, the ESC[=#h command
- will change the screen border to the color #, where # is from 0 - 7, 0
- being black, and 7 being white. Look in the BASIC manual under the
- COLOR command to learn which values give which colors. Here is the patch:
-
- Enter:
- DEBUG ANSI.SYS <RETURN>
-
- Search for the area to patch, enter:
- S 100 L673 3C 07 77 F1 72 06 88 0E FA 00 EB E9 B4 00 CD 10 <RETURN>
-
- Note the address where this occurs (in DOS 3.1 this will be 5DC), enter:
- E <the address you noted> <RETURN>
- 50 <SPACE> 53 <SPACE> B7 <SPACE> 00 <SPACE> 88 <SPACE> C3 <SPACE>
- B4 <SPACE> 0B <SPACE> CD <SPACE> 10 <SPACE> 58 <SPACE> 58 <SPACE>
- 90 <SPACE> 90 <SPACE> 90 <SPACE> 90 <RETURN>
-
- Save the changes you made and quit, enter:
- W <RETURN>
- Q <RETURN>
-
-
- You have now patched ANSI.SYS. I hope you didn't change your only copy.
- If you would like to know an interesting use for this, read on:
- In your AUTOEXEC.BAT file add the line:
-
- PROMPT $e[s$e[24A$p$e[K$e[2;1H$e[K$e[u$n$g$e[=1h$e[37;44m
-
- This will change the screen color to white on blue, and the border to
- blue every time you see the dos prompt. It will also print the current
- directory in the upper-left corner of the screen. I find this damned
- convenient, but if you just want the color, not the directory display,
- add this line to your AUTOEXEC.BAT file.
-
- PROMPT $e[=1h$e[37;44m$n$g
-
- If you don't have the IBM-DOS Technical Reference Manual, get it! It
- explains all the features of the ANSI.SYS driver, and all of the DOS
- FUNCTION CALLS, and much more. I don't know how I'd work without it.
-
- Enjoy, Peter Nelson
-
-